short iir0(short NewSample);
short iir1(short NewSample);
short iir2(short NewSample);
short iir3(short NewSample);
short iir4(short NewSample);
short iir5(short NewSample);
short iir6(short NewSample);
short iir7(short NewSample);
short iir8(short NewSample);

short vals[9];

short filterval(int ndx)
{
	if((ndx > 8) || (ndx < 0))
		return 0;
	
	return vals[ndx];
}

void filtersample(unsigned char sample)
{
	short omg = (sample-128)*128;
	
	vals[0] = iir0(omg);
	vals[1] = iir1(omg);
	vals[2] = iir2(omg);
	vals[3] = iir3(omg);
	vals[4] = iir4(omg);
	vals[5] = iir5(omg);
	vals[6] = iir6(omg);
	vals[7] = iir7(omg);
	vals[8] = iir8(omg);
}
